package com.hns.phone.base.web;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hns.can.common.entity.BaseEntity;
import com.hns.can.common.web.BaseController;
import com.hns.phone.base.service.PhoneBaseCarInfoService;

@Controller
@RequestMapping("/api/phoneBaseCarInfo")
public class PhoneBaseCarInfoController extends BaseController {
	
	@Autowired
    private PhoneBaseCarInfoService phoneBaseCarInfoService;
	
	/**
     * 根据车辆id求车辆信息
     * @param carId
     * @return
     * @throws Exception
     * @author:lan
     * @email:763836737@qq.com
     */
    @RequestMapping("/getCarInfoByCarId")
    @ResponseBody
    public Object getCarInfoByCarId(@RequestParam(value="carId") String carId) throws Exception {
    	BaseEntity entity = phoneBaseCarInfoService.getCarInfoByCarId(carId);
        return this.getReturnResult(entity);
    }
}
